﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Business_Layer;
using DataAccess_Layer;

namespace Control_Layer
{
    // See UseCase:
    // UCD05-FILE (00)
    public class CCOpenFile
    {
        private Service service;

        public CCOpenFile()
        {
            service = Service.GetInstance;
        }

        public void OpenFile(string path)
        {
            FileReader file = new FileReader();
            Project project = (Project)file.Read(path);
            service.GetProject.Open(project.GetMindmaps(),
                                    project.GetCurrentMindmap(),
                                    project.GetHeadMindmap());
        }
    }
}
